<?php

use Phinx\Migration\AbstractMigration;

class ChannelAddFieldb extends AbstractMigration
{
    public function up()
    {
        $table = $this->table("sys_channel");
        $table->addColumn('type', 'integer', ['limit'=>1, 'default'=>2, "comment"=>"类型：1表示CP, 2表示渠道"])
              ->addColumn('ad_price', 'decimal', ["scale"=>3, "default"=>'0.000', "precision"=>10, "comment"=>"广告单价"])
              ->addColumn('ad_type', 'integer', ['limit'=>1, 'default'=>1, "comment"=>"广告类型：1：显示类广告, 2：点击类广告"])
              ->save();
    }
}
